﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Wix.Aura.Common.CustomTypes;

namespace Wix.Aura.Common {
	public class RegistrySearch : Search {
		public RegistrySearch(string id, string key, string name, RegistryRoot root, FileType type)
			: base(id) {
			Id = id;
			Key = key;
			Name = name;
			Root = root;
			FileType = type;
		}

		public string Key { get; set; }
		public string Name { get; set; }
		public RegistryRoot Root { get; set; }
		public FileType FileType { get; set; }
		public YesNoType Win64 { get; set; }

		public override System.Xml.Schema.XmlSchema GetSchema() {
			throw new NotImplementedException();
		}

		public override void ReadXml(System.Xml.XmlReader reader) {
			throw new NotImplementedException();
		}

		public override void WriteXml(System.Xml.XmlWriter writer) {
			writer.WriteStartElement("RegistrySearch");
			writer.WriteAttribute("Id", Id);
			writer.WriteAttribute("Key", Key);
			writer.WriteAttribute("Name", Name);
			writer.WriteAttribute("Root", Root);
			writer.WriteAttribute("Type", FileType);
			writer.WriteAttribute("Win64", Win64);
			if (Child != null)
				Child.WriteXml(writer);
			writer.WriteEndElement();
		}
	}
}
